package org.jtb.quickr;

import java.io.InputStream;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

class AuthCheckTokenRequest extends SignedMethodRequest {
    protected AuthCheckTokenRequest(String baseUrl, String apiKey, String secret, AuthResponse.Token authToken) throws QuickrException {
        super(baseUrl, apiKey, secret, authToken, "flickr.auth.checkToken");        
    }
    
    public AuthResponse execute() throws QuickrException {
        FlickrUrl furl = new SignedMethodUrl(getBaseUrl(), getApiKey(), getSecret(), getAuthToken(), getMethod());
        Get get = new Get(furl.getUrl());
        InputStream is = get.execute();
        
        AuthResponse gtres = new AuthResponse(is);
        
        return gtres;
    }
}
